package weeklearn02;

import java.util.Scanner;
class  Person {

	private String name;
	private int age;
	private boolean gender;
	private int id;
	private static int count = -1;
	
	static {
		System.out.println("This is static initialization block");
	}
	
	public Person(){
		count++;
		this.id =999;
		
	}
	
	
	public Person(String name,int age) {
		this.name  = name;
		this.age = age;
		count+=1;
		this.id = count;
		
	}
	
	public Person(String name,int age, boolean gender) {
		
		this (name,age);
		this.gender = gender;
		count+=1;
		this.id = count;
		
	}
	
	public void setName(String name){
		this.name 

 = name;
	}
	
	public String getName(){
		return name;
	}
	
	public void setGender(boolean gender){
		this.gender = gender;
	}

	public boolean getGender(){
		return gender;
	}
	
	public void setAge(int age){
		this.age = age;
	}
	
	public int getAge(){
		return age;
	}
	
	public String toString(){
		return String.format("Person [name=%s, age=%d, gender=%s, id=%d]", name,age,gender,id);
	}
	

public int getId() {
		return id;
	}


	public void setId(int id) {
		this.id = id;
	}


public static void main(String[] args) {
		//System.out.println("666");
		Scanner sc = new Scanner(System.in );
		Person a=new Person();
		System.out.println(a.getId());
		
	}
}
